package com.resifind.www.po;

import java.util.Objects;

/**
 * @author 36069
 */
public class User {
    private Integer id;
    private String phoneNum;
    private String hasePassword;
    private String salt;
    private String userType;

    public User(Integer id, String phoneNum, String hasePassword, String salt) {
        this.id = id;
        this.phoneNum = phoneNum;
        this.hasePassword = hasePassword;
        this.salt = salt;
    }

    public User() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getPhoneNum() {
        return phoneNum;
    }

    public void setPhoneNum(String phoneNum) {
        this.phoneNum = phoneNum;
    }

    public String getHasePassword() {
        return hasePassword;
    }

    public void setHasePassword(String hasePassword) {
        this.hasePassword = hasePassword;
    }

    public String getSalt() {
        return salt;
    }

    public void setSalt(String salt) {
        this.salt = salt;
    }

    public String getUserType() {
        return userType;
    }

    public void setUserType(String userType) {
        this.userType = userType;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", phoneNum='" + phoneNum + '\'' +
                ", password='" + hasePassword + '\'' +
                ", userType='" + userType + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        User user = (User) o;
        return Objects.equals(id, user.id) && Objects.equals(phoneNum, user.phoneNum) && Objects.equals(hasePassword, user.hasePassword) && Objects.equals(userType, user.userType);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, phoneNum, hasePassword, userType);
    }
}
